package models

//身份证二要素返回码
const (
	RC_ID_YIZHI RcIdName = 1000
	RC_ID_NOT_YIZHI RcIdName = 1001
	RC_ID_KUWU RcIdName = 1002
	RC_ID_ILLEGAL_CARD RcIdName = 1003	//身份证不合法
	RC_ID_ILLEGAL_NAME RcIdName = 1004	//姓名不合法
)

var (
	descs = map[RcIdName]string{
		RC_ID_YIZHI:"一致",
		RC_ID_NOT_YIZHI:"不一致",
		RC_ID_KUWU:"库无",
		RC_ID_ILLEGAL_CARD:"身份证不合法",
		RC_ID_ILLEGAL_NAME:"姓名不合法",
	}
)

//身份证二要素返回码结构体
type RcIdName int

func (this RcIdName) Desc() string {
	return descs[this]
}

func (this RcIdName) Code() int {
	return int(this)
}